﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YanZhiwei.DotNet.Newtonsoft.Json.Utilities.Examples.Models;

namespace YanZhiwei.DotNet.Newtonsoft.Json.Utilities.Examples
{
    public class JsonDatabaseExample
    {
        public static void Demo()
        {
            JsonDatabase db = new JsonDatabase(@"C:\");
            db.OutputIndent = true;

            Cat origin = new Cat() { Name = "Garfield", Legs = 4 };
            db.Save<Cat>(origin);
            db.Save<Cat>(origin.Id, origin);
         
            //db.Delete<Cat>(origin.Id);
        }
    }
}
